package demo05;

import java.util.Calendar;

public class CalenderDemo {
    public static void main(String[] args) {
        Calendar t=Calendar.getInstance();
        int yera=t.get(Calendar.YEAR);
        int month=t.get(Calendar.MONTH)+1;//国外月比国内晚一个月
        int day=t.get(Calendar.DAY_OF_MONTH);
        int weekDay=t.get(Calendar.DAY_OF_WEEK)-1;
        System.out.println(yera+"-"+month+"-"+day+" 星期"+weekDay);
    }
}
